Optimal. Leaf size=232 \[ \frac {a^3 (7+2 m) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {\cos ^{1+m}(c+d x) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m)}-\frac {a^3 (5+4 m) \cos ^{1+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+m) (2+m) \sqrt {\sin ^2(c+d x)}}-\frac {a^3 (11+4 m) \cos ^{2+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2+m) (3+m) \sqrt {\sin ^2(c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 232, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2842, 3047,
3102, 2827, 2722} \begin {gather*} -\frac {a^3 (4 m+5) \sin (c+d x) \cos ^{m+1}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(c+d x)\right )}{d (m+1) (m+2) \sqrt {\sin ^2(c+d x)}}-\frac {a^3 (4 m+11) \sin (c+d x) \cos ^{m+2}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(c+d x)\right )}{d (m+2) (m+3) \sqrt {\sin ^2(c+d x)}}+\frac {a^3 (2 m+7) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (m+2) (m+3)}+\frac {\sin (c+d x) \left (a^3 \cos (c+d x)+a^3\right ) \cos ^{m+1}(c+d x)}{d (m+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 2827
Rule 2842
Rule 3047
Rule 3102
Rubi steps
\begin {align*} \int \cos ^m(c+d x) (a+a \cos (c+d x))^3 \, dx &=\frac {\cos ^{1+m}(c+d x) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m)}+\frac {\int \cos ^m(c+d x) (a+a \cos (c+d x)) \left (2 a^2 (2+m)+a^2 (7+2 m) \cos (c+d x)\right ) \, dx}{3+m}\\ &=\frac {\cos ^{1+m}(c+d x) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m)}+\frac {\int \cos ^m(c+d x) \left (2 a^3 (2+m)+\left (2 a^3 (2+m)+a^3 (7+2 m)\right ) \cos (c+d x)+a^3 (7+2 m) \cos ^2(c+d x)\right ) \, dx}{3+m}\\ &=\frac {a^3 (7+2 m) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {\cos ^{1+m}(c+d x) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m)}+\frac {\int \cos ^m(c+d x) \left (a^3 (3+m) (5+4 m)+a^3 (2+m) (11+4 m) \cos (c+d x)\right ) \, dx}{6+5 m+m^2}\\ &=\frac {a^3 (7+2 m) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {\cos ^{1+m}(c+d x) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m)}+\frac {\left (a^3 (5+4 m)\right ) \int \cos ^m(c+d x) \, dx}{2+m}+\frac {\left (a^3 (11+4 m)\right ) \int \cos ^{1+m}(c+d x) \, dx}{3+m}\\ &=\frac {a^3 (7+2 m) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {\cos ^{1+m}(c+d x) \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{d (3+m)}-\frac {a^3 (5+4 m) \cos ^{1+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+m) (2+m) \sqrt {\sin ^2(c+d x)}}-\frac {a^3 (11+4 m) \cos ^{2+m}(c+d x) \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2+m) (3+m) \sqrt {\sin ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 1.29, size = 0, normalized size = 0.00 \begin {gather*} \int \cos ^m(c+d x) (a+a \cos (c+d x))^3 \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.42, size = 0, normalized size = 0.00 \[\int \left (\cos ^{m}\left (d x +c \right )\right ) \left (a +a \cos \left (d x +c \right )\right )^{3}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^m\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^3 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________